import openpyxl

class Rexcel:

    def readExcel(self,path,sheetname):
        # 将excel中的数据封装为[(1,2,3),(1,3,4)]
        workbook = openpyxl.load_workbook(path,data_only=True)
        rows = workbook[sheetname]
        a = []
        for row in rows:
            b = []
            for cell in row:
                b.append(cell.value)
            a.append(tuple(b))
        return a

if __name__ == '__main__':
    print(str(Rexcel().readExcel(r'E:\啄木鸟47软件测试开发培训\shyoldboy\utils\resources\bolgsys.xlsx','student')[1:-1])[1:-1])